<include file="Public:header"/>
<include file="Public:leftside"/>
<script src="/Store/js/My97DatePicker/WdatePicker.js"></script>
<style>
    .file-item {
        float: left;
        position: relative;
        margin: 0 20px 20px 0;
        padding: 4px;
        background: #000;
    }

    .set-style {
        width: 100%;
    }

    .set-style dl {
        width: 100%;
        font-size: 0; /* line-height: 20px; */
        clear: both;
        padding: 0;
        margin: 0;
        border-bottom: dotted 1px #E6E6E6;
        overflow: hidden;
    }

    .set-style dl dt {
        font-size: 12px;
        line-height: 32px;
        vertical-align: top;
        letter-spacing: normal;
        word-spacing: normal;
        text-align: right;
        display: inline-block;
        width: 19%;
        padding: 10px 1% 10px 0;
        margin: 0;
        font-weight: normal;
    }

    .set-style dl dd {
        font-size: 12px;
        line-height: 32px;
        vertical-align: top;
        letter-spacing: normal;
        word-spacing: normal;
        display: inline-block;
        width: 78%;
        padding: 10px 0 10px 0;
    }

    .set-style dl dd input[type="text"] {
        font: 12px/20px Arial;
        color: #777;
        background-color: #FFF;
        vertical-align: top;
        display: inline-block;
        height: 34px;
        line-height: 34px;
        padding: 4px;
        border: 1px solid #CCC;
        outline: 0 none;
        width: 400px;
        margin: 0 6px 0 0;
    }

    .set-style dl dd input[type="text"].w70 {
        width: 70px;
    }

    .set-style dl dd textarea {
        font: 12px/20px Arial;
        color: #777;
        background-color: #FFF;
        vertical-align: top;
        display: inline-block;
        height: 60px;
        padding: 4px;
        border: solid 1px #CCC;
        outline: 0 none;
        width: 400px;
        margin: 0;
    }

    .hint {
        font-size: 12px;
        line-height: 16px;
        color: #BBB;
        margin-top: 10px;
    }

    .set-style dl dd p img {
        border: medium none;
        vertical-align: middle;
    }

    .class-logo {
        background-color: #FFF;
        position: relative;
        z-index: 1;
    }

    .class-logo p {
        width: 120px;
        height: 100px;
        line-height: 0;
        background-color: #FFF;
        text-align: center;
        vertical-align: middle;
        display: table-cell;
        *display: block;
        overflow: hidden;
        margin: 0 0 10px;
        border: dashed 1px #E6E6E6;
    }

    .class-logo p img {
        max-width: 120px;
        max-height: 100px;
        border: medium none;
        vertical-align: middle;
        margin-top: expression(60-this.height/2);
        *margin-top: expression(30-this.height/2);
    }

    .set-style dl dd p {
        margin-bottom: 0;
    }

    .table-div table tr td {
        border: 1px solid #e6e6e6;
        padding: 10px;
    }

    .goodlist-table tr td {
        border: 1px solid #e6e6e6;
        padding: 10px;
    }

    .form-horizontal .control-group {
        margin-bottom: 0px;
    }

    .form-horizontal .controls {
        margin-left: 20px;
    }

    .help-inline {
        height: 30px;
        line-height: 30px;
    }

    input[type="radio"] {
        margin-top: 6px;
    }

    .controls table tr td input[type="radio"] {
        margin: 0px;
    }

    .total {
        width: 100%;
        overflow: hidden;
    }

    .total label {
        float: left;
        text-align: left;
        font-size: 15px;
        width: 10%;
        overflow: hidden;
        color: #666;
        font-weight: normal;
        line-height: 32px;
        margin-bottom: 0px
    }

    .total label input {
        margin: 0 5px 0 0;
    }

    .edit_button {
        font-family: "microsoft yahei";
        border-radius: 4px;
        padding: 8px 30px;
        background-color: #51A351;
        color: #FFF;
        margin: 20px auto;
        border: none;
        display: block;
    }
</style>
<form action="__CONTROLLER__/coupontypeadd/" class="form form-horizontal" method="post">
    <div class="main-content">
        <div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs">
            <ul class="breadcrumb">
                <li><i class="icon-home home-icon"></i> <a href="/">首页</a></li>
                <li><a href="{:U('Promotion/coupontypelist')}">优惠券</a></li>

            </ul>
        </div>
        <section class="panel panel-default" style="width: 98%;margin: 24px auto;">
            <header class="panel-heading font-bold"> 优惠券</header>

            <div class="page-content">
                <div class="set-style">
                    <dl>
                        <dt><span class="required" style="color:red;">*</span>&nbsp;&nbsp;名称:</dt>
                        <dd>
                            <input type="text" name="coupon_name" maxlength="10" datatype="required" data="优惠券名称">

                            <p class="hint">10个字以内</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt><span style="color:red;">*</span>&nbsp;&nbsp;面额:</dt>
                        <dd><input class="input-mini w70" onkeyup="value=value.replace(/[^\d+(\.\d+)?]/g,'')"
                                   type="text"
                                   name="money" datatype="required" data="面额"><span class="help-inline">元</span>

                        </dd>
                    </dl>
                    <dl>
                        <dt><span style="color:red;">*</span>&nbsp;&nbsp;发放数量:</dt>
                        <dd><input class="input-mini w70" onkeyup='this.value=this.value.replace(/\D/gi,"")' type="text"
                                   name="count" datatype="required" data="发放数量"><span class="help-inline">份</span>

                        </dd>
                    </dl>
                    <dl>
                        <dt><span style="color:red;">*</span>&nbsp;&nbsp;每人最大领取数:<br/>(0无限制)</dt>
                        <dd><input class="input-mini w70" onkeyup='this.value=this.value.replace(/\D/gi,"")' type="text"
                                   name="max_fetch" datatype="required" data="每人最大领取数"><span
                                class="help-inline">份</span>

                        </dd>
                    </dl>
                    <dl>
                        <dt><span style="color:red;">*</span>满多少元使用:</dt>
                        <dd><input class="input-mini w70" onkeyup="value=value.replace(/[^\d+(\.\d+)?]/g,'')"
                                   type="text"
                                   name="at_least" datatype="required" data="满多少元使用"><span class="help-inline">元</span>

                        </dd>
                    </dl>

                    <dl>
                        <dt><span style="color:red;">*</span>&nbsp;&nbsp;有效时间:</dt>
                        <dd>
                            <input class="input-medium" type="text" name="start_time" style="width:250px;"
                                   onclick="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                                   datatype="required"
                                   data="开始时间">
                            <span class="mlr5">-</span>
                            <input class="input-medium" size="15" type="text" name="end_time" style="width:250px;"
                                   onclick="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                                   datatype="required"
                                   data="结束时间">
                            <p class="hint">生效前买家可以领取但不能使用</p>
                        </dd>
                    </dl>
                    <dl>
                        <dt>是否允许首页显示:</dt>
                        <dd>
                            <div class="total">
                                <label for="navigationtype1" class="in"><input type="radio" value="1" name="navigationtype" id="navigationtype1" checked/>开启</label>
                                <label for="navigationtype2" class="out"><input type="radio" value="0" name="navigationtype" id="navigationtype2"/>关闭</label>
                            </div>
                        </dd>
                    </dl>
                   <!-- <dl>
                        <dt>优惠券类型:</dt>
                        <dd>
                            <select name="type" id="range_type">
                                <option value="1">商品</option>
                                <option value="2">分类</option>
                                <option value="3">店铺</option>
                            </select>
                        </dd>
                    </dl>-->

                    <!--<div id="category" style="display: none;">
                        <dl><dt>分类ID:</dt>
                            <dd><input class="input-mini w70" type="text" name="category" datatype="required" data="分类id">
                            </dd>
                    </dl>
                    </div>
                    <div id="store" style="display: none;">
                        <dl><dt>店铺ID:</dt>
                            <dd><input class="input-mini w70" type="text" name="store" datatype="required" data="店铺id">
                            </dd>
                        </dl>
                    </div>-->
                    <include file="Public:selectGoods"/>
                    <button class="formSubmit edit_button" id="form" value="保存" ajax="1" type="button">保存</button>

                </div>
            </div>

        </section>
</form>
<script>
   /* $(function () {
        $('#range_type').change(function () {
            var id=$('#range_type').val();
            if(id==1){
                $('#good').show();
                $('#category').hide();
                $('#store').hide();
            }
            if(id==2){
                $('#good').hide();
                $('#category').show();
                $('#store').hide();
            }
            if(id==3){
                $('#good').hide();
                $('#category').hide();
                $('#store').show();
            }
        })
    })*/
</script>
<include file="Public:footer"/>
